NIELIT O Level Exam

What will be the output of the following Python code?

nums = set([1,1,2,3,3,3,4,4])

print(len(nums))

What will be the output of the following Python code?

nums = set([1,1,2,3,3,3,4,4])

print(len(nums))



निम्नलिखित Python कोड का आउटपुट क्या होगा?

A. 7

B. Error, invalid syntax for formation of set सेट के इन्फॉर्मेशन के लिए एरर, इनवैलिड सिंटैक्स

C. 4

D. 8




Correct Answer is :

C. 4



Explanation
A set doesn’t have duplicate items.
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad